package com.kedacom.testlego.view.activity

import com.kedacom.testlego.databinding.ActivityJzVideoPlayBinding
import com.kedacom.testlego.viewmodel.JzVideoPlayViewModel

//import fm.jiecao.jcvideoplayer_lib.JCVideoPlayer

/**
 *  饺子视频播放器
 *  https://blog.csdn.net/duoduo_11011/article/details/77159998
 *  作者：Caowj
 *  邮箱：caoweijian@kedacom.com
 *  日期：2021/8/16 13:51
 *  @see JzVideoPlayActivity2
 */
@Deprecated("该示例是基于v5.8.1；JzVideoPlayActivity2 使用的是v7.2.0，仓库地址和类都有变化。")
class JzVideoPlayActivity : BaseActivity<ActivityJzVideoPlayBinding, JzVideoPlayViewModel>() {

//    override fun getContentViewId() = R.layout.activity_jz_video_play
//
//    override fun onCreate(savedInstanceState: Bundle?) {
//        super.onCreate(savedInstanceState)
//        // 有问题的播放地址：
////        val url = "http://192.168.20.180/pacc/attachment/v1/paccFileDownload?filePath=2021-08-16/210816092644210810094303VID_20210810_093643.mp4"
//        var url = intent.getStringExtra("videoUrl")
//
//        if (url.isNullOrEmpty()) {
//            url = "http://vfx.mtime.cn/Video/2019/03/12/mp4/190312143927981075.mp4"
//        }
//
//        nViewDataBinding.videoPlayerStand.setUp(
//            url,
//            JCVideoPlayer.SCREEN_LAYOUT_NORMAL,
//            "测试视频"
//        )
//
//        nViewDataBinding.videoPlayerStand.thumbImageView.setImageResource(R.mipmap.ic_launcher)     //播放前显示的图片
//    }
//
//    override fun onBackPressed() {
//        if (JCVideoPlayer.backPress()) {
//            return
//        }
//        super.onBackPressed()
//    }
//
//    override fun onPause() {
//        super.onPause()
//        JCVideoPlayer.releaseAllVideos()
//    }
}
